Skip to main content

consume_backup_code

Function consume_backup_code 

Source
pub fn consume_backup_code(stored_json: &str, code: &str) -> Option<String>
Expand description

If code matches one of the stored (JSON array) hashes, consume it and return the remaining hashes as JSON. Returns None when nothing matched.