package Ġcom . by but ter . sis y ph us . security Ċ Ċ import Ġjavax . crypto . Mac Ċ import Ġjavax . crypto . spec . SecretKey Spec Ċ Ċ fun ĠByteArray . hmac Sha 1 Encrypt ( password : ĠByteArray ): ĠByteArray Ġ{ ĊĠĠĠ Ġval Ġmac Ġ= ĠMac . getInstance (" H mac SHA 1 "). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġinit ( SecretKey Spec ( password , Ġ" H mac SHA 1 ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġreturn Ġmac . do Final ( this ) Ċ } Ċ