EXAMPLES
% sha1::sha1 "hello world"
Должно быть:
2aae6c35c94fcfb415dbe95f408b9ce91ee846ed
2> http://www.vtc.ru/~andrey/xp_crypt/xpcryptsha.htm For testing xp_sha1:
declare @encrypted_password varchar(40)
-- Output result should not be less then 40 chars
declare @clear_password varchar(16)
select @clear_password='abc'
exec xp_sha1 @clear_password,@encrypted_password OUTPUT
select @encrypted_password
Output: should be :
----------------------------------------
A9993E364706816ABA3E25717850C26C9CD0D89D
Example 1. Compute the SHA1 key and print it out as hex
<?php
$input = "Let us meet at 9 o' clock at the secret place.";
$hash = mhash(MHASH_SHA1, $input);
print "The hash is ".bin2hex($hash)."\n";
?>
This will produce:
The hash is d3b85d710d8f6e4e5efd4d5e67d041f9cecedafe
Спасибо.
На Java SHA в стандартных библиотекаъ14.11.02 15:23 Автор: Komlin Статус: Незарегистрированный пользователь
> Добрый день (ночь) ! > > Если кто-то может кинуть для SHA1 несколько примеров > (строка - хэш от нее), то буду очень признателен. > > Если у кого-то исходник есть, то просьба его тоже показать > ;) На любом языке хотя бы... >
import java.security.NoSuchProviderException;
import java.security.NoSuchAlgorithmException;
import java.math.BigInteger;
import java.security.MessageDigest;
public class digest {