What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-18 17:16:08
c# md5 int
int source = 123; String hash; // Do not omit "using" - should be disposed using (var md5 = System.Security.Cryptography.MD5.Create()) { hash = String.Concat(md5.ComputeHash(BitConverter .GetBytes(source)) .Select(x => x.ToString("x... Add solution -
C# 2021-11-14 14:27:12
encrypt password easiest way in web app .net
public static string HashPassword(string password, string algorithm = "sha256") { return Hash(Encoding.UTF8.GetBytes(password), algorithm); } private static string Hash(byte[] input, string algorithm = "sha256") { using (var ha... Add solution -
PHP 2021-11-13 18:20:25
Array and string offset access syntax with curly braces is deprecated in tcpdf.php
//Let's say you have something like this in your code: $str = "test"; echo($str{0}); //since PHP 7.4 curly braces method to get individual characters inside a string has been deprecated, so change the above syntax into this: $str = "test&q... Add solution -
Javascript 2021-11-09 23:38:15
response.render
// send the rendered view to the client res.render('index') // if a callback is specified, the rendered HTML string has to be sent explicitly res.render('index', function (err, html) { res.send(html) }) // pass a local variable to the view res.render(... Add solution -
Java 2021-10-14 19:50:03
java hash password
import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import java.util.Arrays; import java.util.Base64; import java.util.regex.Matcher; impor... Add solution