Change default totp to sha256 (#504)

This commit is contained in:
Firstyear 2021-06-29 09:27:38 +10:00 committed by GitHub
parent 78e189ee34
commit 8aa0056df6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,7 +105,7 @@ impl Totp {
pub fn generate_secure(step: u64) -> Self { pub fn generate_secure(step: u64) -> Self {
let mut rng = rand::thread_rng(); let mut rng = rand::thread_rng();
let secret: Vec<u8> = (0..SECRET_SIZE_BYTES).map(|_| rng.gen()).collect(); let secret: Vec<u8> = (0..SECRET_SIZE_BYTES).map(|_| rng.gen()).collect();
let algo = TotpAlgo::Sha512; let algo = TotpAlgo::Sha256;
Totp { secret, step, algo } Totp { secret, step, algo }
} }