This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate ring; | |
use ring::aead::*; | |
use ring::pbkdf2::*; | |
use ring::rand::SystemRandom; | |
fn main() { | |
// The password will be used to generate a key | |
let password = b"nice password"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HMAC-SHA256 Example</title> | |
</head> | |
<body> | |
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script> | |
<script> | |
var sharedSecret, query, signature, hmac, xhr; |