Method and apparatus for identification and authentication of different magnetic media